package duckHunter.ui;

import java.io.IOException;

import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Font;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;
/**
 * HelpCanvas extends canvas class
 * provide the user with instructions on how to play the game
 * @author AYARI
 *
 */
public class HelpCanvas extends Canvas{
	String [] Story  = {
			"Votre mission est de chasser",
			"le plus grand nombre de canards.",
			"Utiliser les boutons :",
			"bouton 4 : aller a droite",
			"bouton 6 : aller a gauche",
			"bouton 5 : tirer sur les canards"
			
	};
	
	
	protected void paint(Graphics g) {
		g.setColor(255,255,255);
		g.fillRect(0, 0, getWidth(), getHeight());
		g.setColor(0,0,0);
		g.setFont(Font.getFont(Font.FACE_MONOSPACE, Font.STYLE_BOLD, Font.SIZE_MEDIUM));
		g.drawString(Story[0], 10, 70, Graphics.LEFT | Graphics.TOP);
		g.drawString(Story[1], 10, 90, Graphics.LEFT | Graphics.TOP);
		g.drawString(Story[2], 10, 110, Graphics.LEFT | Graphics.TOP);
		g.drawString(Story[3], 10, 130, Graphics.LEFT | Graphics.TOP);
		g.drawString(Story[4], 10, 150, Graphics.LEFT | Graphics.TOP);
		g.drawString(Story[5], 10, 170, Graphics.LEFT | Graphics.TOP);
		Image save[] = new Image[4];
		
		try {
			save[0] = Image.createImage("/img/help.png");
			g.drawImage(save[0], 60,20 , 0);
			
			
		} catch (IOException e) {
			e.printStackTrace();
		}
		
	}
}
